package top.lshaci.learning.nio.zerocopy;

import java.io.DataInputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * OldIOServer
 *
 * @author lshaci
 * @since 1.0.0
 */
public class OldIOServer {

    public static void main(String[] args) throws IOException {
        ServerSocket server = new ServerSocket(6689);
        while (true) {
            Socket client = server.accept();
            DataInputStream dataInputStream = new DataInputStream(client.getInputStream());
            byte[] buffer = new byte[8192];
            while (dataInputStream.read(buffer) != -1) {

            }
        }
    }
}
